@use '@scss/common' as *;

.pagination {
  display: flex;
  align-items: center;
  margin-top: 4rem;

  & > *:not(:last-child) {
    margin-right: 0.25rem;
  }

  @include small-break {
    margin-top: 3rem;
  }
}

.pages {
  display: flex;
  align-items: center;
}

.paginationButton {
  all: unset;
  cursor: pointer;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  border-color: transparent;
  margin-right: 0.5rem;
  position: relative;

  &:hover {
    border-color: var(--grid-line-dark);

    @include data-theme-selector('dark') {
      border-color: var(--grid-line-dark);
    }

    @include data-theme-selector('light') {
      border-color: var(--grid-line-light);
    }
  }

  @include small-break {
    width: 2rem;
    height: 2rem;
    margin-right: 0.25rem;
  }
}

.dash {
  margin-right: 0.5rem;
}

.disabled {
  pointer-events: none;
}

.paginationButtonActive {
  @include data-theme-selector('dark') {
    border-color: var(--grid-line-dark);
  }

  @include data-theme-selector('light') {
    border-color: var(--grid-line-light);
  }

  &::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: calc(100% - 2px);
    height: calc(100% - 2px);
    background-image: url('/images/scanline-dark.png');
    background-repeat: repeat;
    opacity: 0.08;
    box-sizing: border-box;

    @include data-theme-selector('light') {
      background-image: url('/images/scanline-dark.png');
      opacity: 0.08;
    }

    @include data-theme-selector('dark') {
      background-image: url('/images/scanline-light.png');
      opacity: 0.1;
    }
  }
}

.nextPrev {
  display: flex;
  margin-left: 0.5rem;
}

.chevronButton {
  all: unset;
  cursor: pointer;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  border-color: transparent;

  svg {
    width: 1rem;
    height: 1rem;
  }

  &:hover {
    border-color: var(--grid-line-dark);

    @include data-theme-selector('dark') {
      border-color: var(--grid-line-dark);
    }

    @include data-theme-selector('light') {
      border-color: var(--grid-line-light);
    }
  }

  &.disabled {
    cursor: default;
    opacity: 0.5;

    &:hover {
      border-color: transparent;
    }
  }

  @include small-break {
    width: 2rem;
    height: 2rem;
  }
}
